package com.ruoyi.plus.pub.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.xss.Xss;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * 系统公告通知对象 pub_notice_plus
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@TableName("pub_notice_plus")
public class PubNoticePlus extends BaseEntity implements Serializable{
    private static final long serialVersionUID = 1L;

    /** id */
    @TableId(value = "id")
    private Long id;

    /** 标题 */
    @Xss(message = "标题不允许包含脚本")
    @Excel(name = "标题")
    @TableField(value = "title")
    private String title;

    /** 摘要 */
    @Xss(message = "摘要不允许包含脚本")
    @Excel(name = "摘要")
    @TableField(value = "summary")
    private String summary;

    /** 内容 */
    @Excel(name = "内容")
    @TableField(value = "content")
    private String content;

    /** 状态 1 未发布, 2 已发布, 3 已撤销 */
    @Excel(name = "状态 1 未发布, 2 已发布, 3 已撤销")
    @TableField(value = "status")
    private String status;

    @Excel(name = "系统类型")
    @TableField(value = "system_type")
    private String systemType;

    @Excel(name = "类型 1 通知, 2 公告")
    @TableField(value = "type")
    private String type;

    /** 生效时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生效时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(value = "notice_start_time")
    private Date noticeStartTime;

    /** 截止时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "截止时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(value = "notice_end_time")
    private Date noticeEndTime;

    /**
     * 用户id,仅用于查询
     */
    @TableField(exist = false)
    private Long userId;

    @TableField(exist = false)
    private String readStatus;

    @TableField(exist = false)
    private Long[] checkList;

    /**
     * 部门id,仅用于查询
     */
    @TableField(exist = false)
    private Long deptId;

    /**
     * 报修编号
     */
    @TableField(exist = false)
    private Long repairNum;

    /**
     * 报修类型
     */
    @TableField(exist = false)
    private String typeName;

    /**
     * 报修地址
     */
    @TableField(exist = false)
    private String address;

}
